<#import "../macro/components.ftl" as components/>
<#include "../macro/layout_default.ftl"/>

<@head>
<link rel="stylesheet" href="/misc/app/css/product_list.css"/>
</@head>

<@body>
</@body>

<@layout_default>
<div class="box">
    <div class="box-header with-border">
        <span class="pull-right text-muted">共 ${pagelist.resultTotal} 条记录</span>
    </div>

    <!-- /.box-header -->
    <div class="box-body">
        <table class="table table-striped table-hover">
            <tr>
                <th>组合码批次</th>
                <th>开始编号</th>
                <th>结束编号</th>
                <th>绑定数量</th>
                 <th>绑定产品</th>
            </tr>
            <#list pagelist.result as item>
                <tr >
                 	<td style="vertical-align:middle;">${item.qcname}</td>
                     <td style="vertical-align:middle;">
                    	<#if item.g_s_no!=0>
                    	${item.g_s_no!}<hr>
                    	</#if>
                    	${item.s_no!}
                    	
                    	</td>
                    <td style="vertical-align:middle;">
                    	<#if item.g_e_no!=0>
	                    ${item. g_e_no!}<hr>
	                    </#if>
	                    ${item. e_no!}
                    
                    </td>
                    
                    <td style="vertical-align:middle;">
                    	<#if item.g_q_count!=0>
	                    ${item.g_q_count!}<hr>
	                     </#if>
	                    ${item.q_count!}
                    
                    </td>
                     <td style="vertical-align:middle;">${item.pname}</td>
                   
                </tr>
            </#list>
        </table>
    </div>
    <!-- /.box-body -->
    <div class="box-footer text-center">
       <@components.pagination "${pagelist.rquesturl}&page=$page",pagelist.page,pagelist.pageTotal/>
    </div>
</div>


<!--=========== Modals =============-->
<!-- md_new -->
<div class="modal" id="md_new" tabindex="-1">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title"><i class="fa fa-plus"></i> 新增绑定</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" name="form_new">
                  <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 绑定产品:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="绑定产品" name="pname"  id="search_pname" data-provide="typeahead" data-items="8"  />
                        </div>
                    </div>
                      <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 二维码类型:</label>
                        <div class="col-sm-10">
                            <select class="form-control" id="type" name="type">
                                <option value="1">瓶码/盒码</option>
                                <option value="2">箱码</option>
                                <option value="3">组合码</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 二维码名称:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="二维码名称" name="qcname"  id="search_qcname" data-provide="typeahead" data-items="8" />
                        </div>
                    </div>
                   <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 规格:</label>
                        <div class="col-sm-10">
                        	 <input type="text" class="form-control" placeholder="规格" name="pbcId"  id="_pbcid" readonly/>
                        	 <!-- <input type="hidden"  name="pbcId"  id="_pbcidbak"/>-->
                        </div>
                    </div>
                    
                     <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 剩余数量:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="_leftnub"  placeholder="剩余数量" name="nubs" readonly/>
                        </div>
                    </div>
                    
                    <hr>
                    
                     <h4 class="modal-title">编号绑定</h4>
                     <br>
                    
                    <div class="form-group" id="xmsdiv" style="display:none;">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong> 箱码开始编号:</label>
                        <div class="col-sm-10">
                        	<input type="hidden"  id="xms_bak" />
                            <input type="text" class="form-control" id="xms"  placeholder="箱码开始编号" name="xms" readonly/>
                        </div>
                    </div>
                    
                       <div class="form-group" id="xmediv"  style="display:none;">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong>箱码结束编号:</label>
                        <div class="col-sm-10">
                        	<input type="hidden"  id="xme_bak" />
                            <input type="text" class="form-control" id="xme" placeholder="箱码结束编号" name="xme"  />
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong>瓶码/盒码开始编号:</label>
                        <div class="col-sm-10">
                       		 <input type="hidden"  id="pms_bak" />
                            <input type="text" class="form-control" id="pms"  placeholder="瓶码/盒码开始编号" name="pms" readonly/>
                        </div>
                    </div>
                    
                       <div class="form-group">
                        <label class="col-sm-2 control-label"><strong class="text-red bold"> *</strong>瓶码/盒码结束编号:</label>
                        <div class="col-sm-10">
                        	<input type="hidden"  id="pme_bak" />
                            <input type="text" class="form-control" id="pme" placeholder="瓶码/盒码结束编号" name="pme"  />
                        </div>
                    </div>
                   
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="btn_new_save" name="btn_new_save">绑定</button>
            </div>
        </div>
    </div>
</div>


</@layout_default>